﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Telerik.Windows.Controls;

namespace FIFP.DashBoard.Converters
{
    public class GroupItemStyleSelector : ScheduleViewStyleSelector
    {
        #region Variables
        private Style groupItemStyle;
        private Style defaultStyle;
        private Style timeRulerLineStyle;
        #endregion

        #region Properties
        public Style GroupItemStyle
        {
            get
            {
                return this.groupItemStyle;
            }
            set
            {
                this.groupItemStyle = value;
            }
        }
        public Style DefaultStyle
        {
            get
            {
                return this.defaultStyle;
            }
            set
            {
                this.defaultStyle = value;
            }
        }
        public Style TimeRulerLineStyle
        {
            get
            {
                return this.timeRulerLineStyle;
            }
            set
            {
                this.timeRulerLineStyle = value;
            }
        }
        #endregion

        #region SelectStyle
        public override Style SelectStyle(object item, DependencyObject container, ViewDefinitionBase activeViewDefinition)
        {
            if (container is TimeRulerGroupItem)
            {
                return this.GroupItemStyle;
            }
            else if (container is TimeRulerLine)
            {
                return this.TimeRulerLineStyle;
            }
            return this.DefaultStyle;
        }
        #endregion
    }
}
